from .base_model import BaseModel
from django.db import models

class Subject(BaseModel):
    """学科模型"""
    name = models.CharField(max_length=50, verbose_name="学科名称")
    code = models.CharField(max_length=20, unique=True, verbose_name="学科代码")
    description = models.TextField(blank=True, verbose_name="学科描述")

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = "学科"
        verbose_name_plural = "学科"